load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("scm_server_infra")

rust_library(
    name = "hooks",
    srcs = glob([
        "src/**/*.rs",
    ]),
    autocargo = {
        "cargo_target_config": {
            "doctest": False,
            "test": False,
        },
    },
    test_deps = [
        "fbsource//third-party/rust:pretty_assertions",
        "fbsource//third-party/rust:tokio",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/mononoke_types:mononoke_types-mocks",
        "//eden/mononoke/repo_attributes/hook_manager/hook_manager_testlib:hook_manager_testlib",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_permission_checker:repo_permission_checker",
        "//eden/mononoke/repo_factory:test_repo_factory",
        "//eden/mononoke/tests/fixtures:fixtures",
        "//eden/mononoke/tests/utils:tests_utils",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:fancy-regex",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:hyper-0-14",
        "fbsource//third-party/rust:hyper-tls",
        "fbsource//third-party/rust:ipnetwork",
        "fbsource//third-party/rust:itertools",
        "fbsource//third-party/rust:lazy_static",
        "fbsource//third-party/rust:maplit",
        "fbsource//third-party/rust:regex",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:serde_derive",
        "fbsource//third-party/rust:serde_json",
        "fbsource//third-party/rust:serde_regex",
        "fbsource//third-party/rust:thiserror",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tracing",
        "//common/rust/identity:identity_ext",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/justknobs_stub:justknobs",
        "//common/rust/shed/stats:stats",
        "//configerator/structs/infrasec/if:acl-rust",
        "//crypto/keychain_service:if-rust",
        "//crypto/keychain_service:if-rust-srclients",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/common/facebook/thrift_client:thrift_client",
        "//eden/mononoke/common/scuba_ext:scuba_ext",
        "//eden/mononoke/derived_data:fsnodes",
        "//eden/mononoke/derived_data:skeleton_manifest",
        "//eden/mononoke/facebook/employee_service:employee_service",
        "//eden/mononoke/facebook/phabricator:phabricator",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/mercurial:mercurial_types",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/permission_checker:permission_checker",
        "//eden/mononoke/repo_attributes/bookmarks:bookmarks",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/hook_manager/hook_manager:hook_manager",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_cross_repo:repo_cross_repo",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/repo_attributes/restricted_paths:restricted_paths",
        "//eden/mononoke/scs/if:source_control-rust",
        "//eden/mononoke/scs/if:source_control-rust-clients",
        "//eden/mononoke/server/context:context",
        "//eden/scm/lib/clientinfo:clientinfo",
        "//infrasec/authorization/if:if-aclchecker-rust",
        "//infrasec/authorization/if:if-aclchecker-rust-clients",
        "//infrasec/authorization/if:if-aclchecker-rust-srclients",
        "//infrasec/authorization/if:if-service-rust-clients",
        "//infrasec/authorization/if:if-service-rust-srclients",
        "//security/source_control/verify_integrity:verify_integrity_client_lib",
        "//security/source_control/verify_integrity/if:verify_integrity_service-rust",
        "//signedsources:signedsources",
    ],
)
